Optimal. Leaf size=211 \[ \frac {(4+m) (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {2^{\frac {1}{2}+m} m \left (5+3 m+m^2\right ) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sec (e+f x))\right ) (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 211, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3909, 4095,
4086, 3913, 3912, 71} \begin {gather*} \frac {2^{m+\frac {1}{2}} m \left (m^2+3 m+5\right ) \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sec (e+f x))\right )}{f (m+1) (m+2) (m+3)}+\frac {m \tan (e+f x) (a \sec (e+f x)+a)^{m+1}}{a f \left (m^2+5 m+6\right )}+\frac {\tan (e+f x) \sec ^2(e+f x) (a \sec (e+f x)+a)^m}{f (m+3)}+\frac {(m+4) \tan (e+f x) (a \sec (e+f x)+a)^m}{f (m+1) (m+2) (m+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 71
Rule 3909
Rule 3912
Rule 3913
Rule 4086
Rule 4095
Rubi steps
\begin {align*} \int \sec ^4(e+f x) (a+a \sec (e+f x))^m \, dx &=\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {\int \sec ^2(e+f x) (a+a \sec (e+f x))^m (2 a+a m \sec (e+f x)) \, dx}{a (3+m)}\\ &=\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )}+\frac {\int \sec (e+f x) (a+a \sec (e+f x))^m \left (a^2 m (1+m)+a^2 (4+m) \sec (e+f x)\right ) \, dx}{a^2 (2+m) (3+m)}\\ &=\frac {(4+m) (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )}+\frac {\left (m \left (5+3 m+m^2\right )\right ) \int \sec (e+f x) (a+a \sec (e+f x))^m \, dx}{(1+m) (2+m) (3+m)}\\ &=\frac {(4+m) (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )}+\frac {\left (m \left (5+3 m+m^2\right ) (1+\sec (e+f x))^{-m} (a+a \sec (e+f x))^m\right ) \int \sec (e+f x) (1+\sec (e+f x))^m \, dx}{(1+m) (2+m) (3+m)}\\ &=\frac {(4+m) (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )}-\frac {\left (m \left (5+3 m+m^2\right ) (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(1+x)^{-\frac {1}{2}+m}}{\sqrt {1-x}} \, dx,x,\sec (e+f x)\right )}{f (1+m) (2+m) (3+m) \sqrt {1-\sec (e+f x)}}\\ &=\frac {(4+m) (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {\sec ^2(e+f x) (a+a \sec (e+f x))^m \tan (e+f x)}{f (3+m)}+\frac {2^{\frac {1}{2}+m} m \left (5+3 m+m^2\right ) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sec (e+f x))\right ) (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \tan (e+f x)}{f (1+m) (2+m) (3+m)}+\frac {m (a+a \sec (e+f x))^{1+m} \tan (e+f x)}{a f \left (6+5 m+m^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.39, size = 154, normalized size = 0.73 \begin {gather*} \frac {(1+\sec (e+f x))^{-\frac {1}{2}-m} (a (1+\sec (e+f x)))^m \left (2^{\frac {3}{2}+m} m \left (5+3 m+m^2\right ) \, _2F_1\left (\frac {1}{2},-\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sec (e+f x))\right )+(1+\sec (e+f x))^{\frac {1}{2}+m} \left (4+m+m^2+m (1+2 m) \sec (e+f x)+\left (2+5 m+2 m^2\right ) \sec ^2(e+f x)\right )\right ) \tan (e+f x)}{f (2+m) (3+m) (1+2 m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \left (\sec ^{4}\left (f x +e \right )\right ) \left (a +a \sec \left (f x +e \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{m} \sec ^{4}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m}{{\cos \left (e+f\,x\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________